package com.matrix.java.chap_04;

import java.util.Scanner;

/*
    判断元音还是辅音
 */
public class Ex4_13 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter a letter: ");
        String letter = input.next();
        String letterGroup = "AEIOUaeiou";
        if (letter.charAt(0) < 'A' || letter.charAt(0) > 'z') {
            System.out.println(letter + " is an invalid input");
            return;
        } else if (!letterGroup.contains(letter)) {
            System.out.println(letter + " is a consonant");
        } else {
            System.out.println(letter + " is a vowel");
        }
        input.close();
    }
}
